/*
 * @Author: C.
 * @Date: 2021-09-03 13:34:58
 * @LastEditTime: 2021-09-06 15:30:48
 * @Description: file content
 */
import { FormSchema } from '/@/components/Table';

export const FieldSchema: FormSchema[] = [
  {
    field: 'role',
    component: 'Select',
    label: '类型',
    componentProps: {
      options: [
        {
          label: '数据字段',
          value: 'value',
          key: '1',
        },
        {
          label: '二维码',
          value: 'qrcode',
          key: '2',
        },
        {
          label: '图片',
          value: 'image',
          key: '3',
        },
      ],
    },
    rules: [
      {
        required: true,
        message: '请选择类型',
      },
    ],
  },
  {
    field: 'prop',
    label: '绑定字段',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写绑定字段',
      },
    ],
  },
  {
    field: 'label',
    label: '字段描述',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写字段描述',
      },
    ],
  },
];

export const TableFieldItem: FormSchema[] = [
  {
    field: 'prop',
    label: '绑定字段',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写绑定字段',
      },
    ],
  },
  {
    field: 'label',
    label: '字段描述',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写字段描述',
      },
    ],
  },
];
export const TableField: FormSchema[] = [
  {
    field: 'prop',
    label: '绑定字段',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写绑定字段',
      },
    ],
  },
];
export const AddTableForm: FormSchema[] = [
  {
    field: 'title',
    label: '表格标题',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写表格标题',
      },
    ],
  },
  {
    field: 'prop',
    label: '绑定字段',
    component: 'Input',
    rules: [
      {
        required: true,
        message: '请填写绑定字段',
      },
    ],
  },
];
